package main

import "learngo/containerset/intset"
import "fmt"

func main() {
	intSet := set.CreateIntSet()
	for _, i := range []int{1, 3, 5, 7} {
		intSet.Add(i)
		fmt.Println(intSet)
	}
	fmt.Println()
	for _, i := range []int{1, 2, 3, 4, 5, 6, 7} {
		fmt.Println(i, intSet.Contains(i), " ")
		intSet.Delete(i)
		fmt.Println(intSet)
	}
	fmt.Println("===final result===")

	functions := intSet.U
	for _,f:=range functions{
		if f != nil{
			f()
		}
	}
	fmt.Println(intSet)

}
